How can I get the ASCII code for a character in C#? Anonymous User230206-Jan-2011c#c# Updated on 22-Sep-2020
Anonymous User
06-Jan-2011Casting the char to an int will give you the ASCII value: char c = 'f';
System.Console.WriteLine((int)c);